/********************************************************************
	TABAL ENGINE - 2012/11/09
	author:		Marc Cuscullola
	
	purpose:	Defines the mouse input
*********************************************************************/
#pragma once

#ifndef __MOUSE__INCLUDED_H__
#define __MOUSE__INCLUDED_H__

#include "InputDevice.h"
#include "Vector/Vector2.h"
#include "Vector/Vector3.h"

#define BUFFER_SIZE 16

class CMouse : public CInputDevice
{
public:
	CMouse();
	~CMouse();

	bool	Initialize	(LPDIRECTINPUT8 _directInput, HWND _hWnd, const Vect2u& _screenRes, bool _bExclusiveMode /* = false */);
	bool	Update		();

	const Vect3i&   GetMouseDelta() const;

	bool	        IsDown		 (uint32 nBtn) const;
	bool	        IsUpDown	 (uint32 nBtn) const;
	bool	        IsDownUp	 (uint32 nBtn) const;

private:
	HANDLE	m_HandleEvent;

	bool	m_bIsDown[3];
	bool	m_bIsUpDown[3];
	bool	m_bIsDownUp[3];

	Vect2i	m_MousePosition;
	Vect2i	m_ScreenResolution;
	Vect3i	m_Delta;
};

#endif //__MOUSE__INCLUDED_H__
